<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta http-equiv="X-UA-Compatible" content="IE=8">
		<title>新闻 </title>
		<!--<link href="../favicon.ico" rel="icon" type="image/x-icon" />-->
		<link rel="stylesheet" href="../../bootstrap/css/bootstrap.min.css">
		<link rel="stylesheet" href="../../layui/css/layui.css">
		<link rel="stylesheet" href="../../css/swiper.min.css">
		<link rel="stylesheet" href="../../css/common.css">
		<link rel="stylesheet" href="../../css/default.css">
		<link rel="stylesheet" href="../../css/style.css">

		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js?version=1.01"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js?version=1.01"></script>
    <![endif]-->

	</head>

	<body>
		<div class="top_header_wrap"></div>
		<!--#include file="../common/header.html" -->
		<!--广告-->
		<div class="banner">
			<div class="swiper-container swiper-container1">
				<div class="swiper-wrapper">
					<div class="swiper-slide"><img src="../../img/banner02.png"></div>
					<div class="swiper-slide"><img src="../../img/banner01.png"></div>
					<div class="swiper-slide"><img src="../../img/banner03.png"></div>
				</div>
				<!-- Add Pagination -->
				<div class="swiper-pagination"></div>
			</div>
		</div>
		<!--内容-->
		<div class="main_container">
			<div class="layui-container">
				<div class="module_box module_box_new">
					<div class="module_title">
						<h2>高考新闻</h2>
						<h3>THE UNIVERSITY ENTRANCE EXAM news</h3>
					</div>
					<div class="layui-row search_row">
						<h3>搜索您想要的信息</h3>
						<div class="search_box">
							<input type="search" class="search_input" placeholder="请输入您的关键字" /><button class="search_image"><img src="../../img/search.png"/></button>
						</div>
					</div>
					<div class="layui-row news_scroll">
						
						<div class="swiper_father">
							<div class="swiper-container swiper-container2">
								<div class="swiper-wrapper" id="news_content">
									<div class="swiper-slide">
										<div class="news_module active">
											<img src="../../img/news01.jpg" />
											<div class="news_shade">
												<h4>西安交通大学预扩招1新生</h4>
												<p>
													西安交通大学2019年预计活经验中得以自己所认为的价值观。教育，是一种提高人的综合素质的实践活动。对于2019届新生是一个重大的机遇与挑战，许多的学生
												</p>
											</div>
											<div class="get_more_message">
												<button class="get_more">了解更多</button>
											</div>
										</div>
									</div>
									<div class="swiper-slide">
										<div class="news_module active">
											<img src="../../img/news01.jpg" />
											<div class="news_shade">
												<h4>西安交通大学预扩招2新生</h4>
												<p>
													西安交通大学2019年预计活经验中得以自己所认为的价值观。教育，是一种提高人的综合素质的实践活动。对于2019届新生是一个重大的机遇与挑战，许多的学生
												</p>
											</div>
											<div class="get_more_message">
												<button class="get_more">了解更多</button>
											</div>
										</div>
									</div>
									<div class="swiper-slide">
										<div class="news_module active">
											<img src="../../img/news01.jpg" />
											<div class="news_shade">
												<h4>西安交通大学预扩招3新生</h4>
												<p>
													西安交通大学2019年预计活经验中得以自己所认为的价值观。教育，是一种提高人的综合素质的实践活动。对于2019届新生是一个重大的机遇与挑战，许多的学生
												</p>
											</div>
											<div class="get_more_message">
												<button class="get_more">了解更多</button>
											</div>
										</div>
									</div>
									<div class="swiper-slide">
										<div class="news_module active">
											<img src="../../img/news01.jpg" />
											<div class="news_shade">
												<h4>西安交通大学预扩招4新生</h4>
												<p>
													西安交通大学2019年预计活经验中得以自己所认为的价值观。教育，是一种提高人的综合素质的实践活动。对于2019届新生是一个重大的机遇与挑战，许多的学生
												</p>
											</div>
											<div class="get_more_message">
												<button class="get_more">了解更多</button>
											</div>
										</div>
									</div>


								</div>
								<!-- Add Pagination -->
								<div class="swiper-pagination"></div>

								
							</div>
							<!-- Add Arrows -->
								<div class="swiper-button-next layui-hide-xs"></div>
								<div class="swiper-button-prev layui-hide-xs"></div>
						</div>
						<!---->
						<!--关于我们-->
						<div class="module_box">
							<div class="module_title">
								<h2>最新视讯</h2>
								<h3>THELATESTVIDEOvVIDEO</h3>
							</div>
							<div class="layui-row">

							</div>
						</div>
						<div class="latest_news layui-container">
							<div class="layui-col-lg6 layui-col-md6 layui-col-sm12 layui-col-xs12">
								<div class="video_container">
									<video index="0" class="video-js vjs-default-skin" controls="" preload="none">
										<source src="http://wlypublic.oss-cn-beijing.aliyuncs.com/video/2018民办教育领袖峰会杨建民主题演讲.mp4" type="video/mp4">
									</video>
								</div>
							</div>
							<div class="layui-col-lg6 layui-col-md6 layui-col-sm12 layui-col-xs12">
								<div class="latest_news_text">
									<h4>操作指南</h4>
									<p>
										教育，教育者按照法律法规和行业规范，根据学校条件和职称，有目的有计划有组织的对受教育者的心智发展进行教化培育，以现有的经验、学
									</p>
								</div>
							</div>
						</div>
					</div>

				</div>
			</div>
			<!--尾部-->
			<div class="footer_container">

			</div>
		</div>
	</body>
	<script type="text/javascript" src="../../js/jquery-1.11.0.min.js"></script>
	<script type="text/javascript" src="../../js/define.js"></script>

	<script type="text/javascript" src="../../js/swiper.min.js"></script>
	<script type="text/javascript" src="../../js/swiper.js"></script>
	<script type="text/javascript" src="../../bootstrap/js/bootstrap.min.js"></script>
	<script>
		function getContent(c) {
			return c.length > 100 ? c.substring(0, 100) : c;
		}
		function swiperFun(){
			var swiper = new Swiper('.swiper-container2', {
				
				slidesPerView: 3,
			      spaceBetween: 30,
			      pagination: {
			        el: '.swiper-pagination',
			        clickable: true,
			      },
				
				nextButton: '.swiper-button-next',
				prevButton: '.swiper-button-prev',
			
			});
		}
		//("/dynamic/news/list/{currPage}/{pageSize}/{category}/{categoryName}")
		
		
		var keyword = '理工'

		function getData(keyword, isFirst) {
			var url = "http://47.111.188.27:8080/gsgkzyl/dynamic/search/keyword/1/6/" + keyword;
			if(isFirst){
				url = "http://47.111.188.27:8080/gsgkzyl/dynamic/news/list/1/6/2/报考简讯";
			}
			$.ajax({
				type: "get",
				url: url,
				success: function(r) {
					
					if(r.data == null || r.data == "" || r.data == "{}" || r.data == "[]"){
						//这儿写没有数据的逻辑
						$('#news_content').html('暂无数据');
						return ;
					}
					$('#news_content').empty();
					var data = r.data.list;
					console.log(data)

					if(data != null && data != "" && data != "{}" && data != "[]") {
						var newsHtml = '';
						for(var i = 0; i < data.length; i++) {
							newsHtml += '<div class="swiper-slide">';
							newsHtml += '<a href="/dynamic/news_detail.html?id=' + data[i].id + '">';
							newsHtml += '<div class="news_module">';
							newsHtml += '<img src="' + data[i].image_list + '" />';
							newsHtml += '<div class="news_shade">';
							newsHtml += '<h4>' + data[i].title + '</h4>';
							newsHtml += '<p>';
							newsHtml += '' + data[i].detail + '';
							newsHtml += '</p>';
							newsHtml += '</div>';
							if(i == data.length-1){
								newsHtml += '<div class="get_more_message">';
								newsHtml += '<button class="get_more"><a href="/dynamic/snews_list.html">了解更多</a></button>';
								newsHtml += '</div>';
							}
							
							newsHtml += '</div>';
							newsHtml += '</a>';
							newsHtml += '</div>';
						}
						$('#news_content').html(newsHtml);
						swiperFun();
					} else {
						$('#news_content').html('暂无数据');
					}
				}
			})
		}
		$(document).ready(function() {

			$(".top_header_wrap").load("../common/header.html");
			$(".footer_container").load("../common/footer.html");
			$('.search_image').click(function() {
				var keyNews = $('.search_input').val();
				keyword = keyNews;
				getData(keyword)
			})

			getData('理工', true)

		});
	</script>

</html>